package com.wsh.service;

import com.wsh.dao.FilesMapper;
import com.wsh.po.Files;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author wsh
 * @create 2021-10-11 17:14
 */
@Service
@Transactional
public class FilesServiceImpl implements FilesService{

//    注入mapper
    @Autowired
    private FilesMapper filesMapper;

    public void addFile(Files files) {
        filesMapper.addFile(files);
    }

    @Override
    public String queryFileByUUID(String UUID) {
        return filesMapper.queryFileByUUID(UUID);
    }

    @Override
    public Files queryFileJSON(String UUID) {
        return filesMapper.queryFileJSON(UUID);
    }

    public List<Files> queryAllFiles() {
        return filesMapper.queryAllFiles();
    }
}
